package com.wlyy.his.common.api;

/**
 * 枚举了一些常用API操作码
 * @author 10097
 */
public enum ResultCode implements IErrorCode {

    /**
     *
     */
    SUCCESS(200, "success"),
    FAILED(500, "fail"),
    VALIDATE_FAILED(3000, "validate failed"),
    UNAUTHORIZED(401, "No login is performed or the token has expired"),
    FORBIDDEN(403, "No relevant permissions");
    private final Integer code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
